function validate(){
	var warning ="";
	var warning = document.getElementById("warning");
	var status ="";
	var formatvalid= checkformat();
	
	var check = (formatvalid);
	if(!check){
	    if(!formatvalid)
			status = "Please enter Location in the correct format." +
					"<br> Leading character and ending character should be Alphanumeric." +
					" Length should be less than 100.";
	
		warning.innerHTML = status;
		}
	else{
		return true;
	}
	return false;
}

function checkformat(){  
	var tomatch = /^[a-zA-Z].+[a-zA-Z]$/;
	var location = document.getElementById("Location").value;
	var lengtherror = (location.length > 100);
	var leadingerror = (tomatch.test(location) == 0)
	if(lengtherror || leadingerror){
		return false;
	}
	return true;
}